//
//  SysDict.h
//  XPhoto
//
//  Created by sentinel on 2020/4/13.
//  Copyright © 2020 baboy. All rights reserved.
//

#import <BKKit/Model.h>
#define API_DICT_SEARCH             @"sys_dict_search"


#define SYS_DICT_SERIAL_TYPE_KEY            @"serial_type"
#define SYS_DICT_GENDER_KEY                 @"gender"
#define SYS_DICT_INTERCEP_HOST_KEY          @"interception_host"
#define SYS_DICT_EXPLORE_CATEGORY_KEY       @"explore_category"
#define SYS_DICT_EXPLORE_SEARCH_TYPE_KEY    @"explore_search_type"
#define SYS_DICT_PHOTO_FILTER               @"photo_filter"

#define SERIAL_TYPE_DATE            1
#define SERIAL_TYPE_LOCATION        2
#define SERIAL_TYPE_TAG             3


#define SYS_DICT_KEY_WEB_LINK                       @"web_link"
#define SYS_DICT_ITEM_KEY_COMPLAINT_LINK            @"complaint_link"
#define SYS_DICT_ITEM_KEY_APP_UPGRADE_LINK          @"app_upgrade_link"


NS_ASSUME_NONNULL_BEGIN

@class SysDictSearchArgs;
@interface SysDictItem : Model
@property(nonatomic, assign) NSInteger id;
@property(nonatomic, assign) NSInteger dictId;
@property(nonatomic, strong) NSString *title;
@property(nonatomic, strong) NSString *key;
@property(nonatomic, strong) NSString *value;
@end

@interface SysDict : Model
@property(nonatomic, assign) NSInteger id;
@property(nonatomic, strong) NSString *module;
@property(nonatomic, strong) NSString *type;
@property(nonatomic, strong) NSString *title;
@property(nonatomic, strong) NSString *value;
@property(nonatomic, strong) NSString *key;
@property(nonatomic, strong) NSArray<SysDictItem*> *items;
@property(nonatomic, strong) SysDictItem *itemsItem;

+ (SysDict *)dictForKey:(NSString *)key;
//+ (SysDictItem *)itemForDictKey:(NSString *)key value:(NSString *)val;
+ (SysDictItem *)itemForValue:(NSString *)key dictKey:(NSString *)dictKey;
+ (SysDictItem *)itemForKey:(NSString *)key dictKey:(NSString *)dictKey;
+ (void)loadSysDict;
@end
@interface SysDictSearchArgs : Model

@end
NS_ASSUME_NONNULL_END
